gl: Maintain state when truncating
authorMatthias Clasen <mclasen@redhat.com>
Sun, 12 Feb 2023 14:56:32 +0000 (09:56 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 12 Feb 2023 14:56:32 +0000 (09:56 -0500)
commitb6c3cf4eee7af05d7bd5ce4fd9f421a2ae03d60b
tree46b1feeb2188a09547e65f8bf485fc12a47dc74a
parent157ef1d3959947593e914496f02a86e2f062a91c
gl: Maintain state when truncating

When we truncate the command queue because it
is too big, we were messing up our state accounting
and running into criticals as a consequence.

This can be reproduced by opening a well-populated
fishbowl demo in the inspectors recorder.

Fixes: #5188
gsk/gl/gskglcommandqueue.c